Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 4 - Mappers / Mappers Reference
Functions / Registering and Deleting Names


OTRegisterName

Registers an entity name on the network.

C INTERFACE
OSErr OTRegisterName (MapperRef ref, TRegisterRequest* request, 
                      TRegisterReply* reply);
C++ INTERFACES
None. C++ applications use the C interface to this function.

PARAMETERS
ref
A mapper reference.
request
A pointer to a TRegisterRequest structure (page 4-11) that specifies the entity name you want to register and the endpoint address.
reply
A pointer to a TRegisterReply structure (page 4-12) that specifies the address and ID of the endpoint whose name is being registered.
DESCRIPTION
If the name-registration protocol defined using the config parameter to the OTOpenMapper or OTAsyncOpenMapper function supports dynamic name and address registration, you can use the OTRegisterName function to make a name visible on the network to other network devices.

Some protocol implementations under Open Transport allow a client to specify a name rather than an address when binding the endpoint using the OTBind function. Binding an endpoint by name causes the protocol to automatically register the name on the network if the protocol supports dynamic name registration. This is the simpler technique for registering a name and is preferred over creating a mapper provider and then using the OTRegisterName function to register the name.

The format for the requested name and address is specific to the protocol used. Please consult the documentation for the protocol you are using for format information.

COMPLETION EVENT CODES
T_REGNAMECOMPLETE0x2000000DThe OTRegisterName function has completed. The cookie parameter of the notifier function points to the reply parameter.
SEE ALSO
You use the OTLookupName function (page 4-25), to search for a registered name or to confirm that a name has been registered.

You use the OTDeleteName function (described next) or the OTDeleteNameByID function (page 4-24) to remove a previously registered name.

You use the OTOpenMapper function (page 4-19) or OTAsyncOpenMapper function (page 4-16) to create a mapper.

The OTBind function is described in the chapter "Endpoints" in this book.

For information on how to use this function with a TCP/IP protocol, see page 8-20 in the TCP/IP chapter.

Notifier functions are described in the chapter "Providers" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996